package com.cooper.scraper;

import java.util.List;

import com.cooper.android.comm.Resource;

public interface ResourceScraper<T extends Resource> {

	public abstract ResultUrl createBrowseUrl(int pageNumber)
			throws DownloadException, ScraperException;

	public abstract ResultUrl createSearchUrl(String keyword, int pageNumber)
			throws DownloadException, ScraperException;

	public abstract List<T> extractBrowseResource(String page, String referer)
			throws DownloadException, ScraperException;

	public abstract List<T> extractBrowseResource(String page, String referer,
			String redirectUrl) throws DownloadException, ScraperException;

	public abstract List<T> extractSearchResource(String page, String referer)
			throws DownloadException, ScraperException;

	public abstract List<T> extractSearchResource(String page, String referer,
			String redirectUrl) throws DownloadException, ScraperException;

	public abstract int getSearchPageCount(String page)
			throws DownloadException, ScraperException;

	public abstract int getSearchPageCount(String page, String redirectUrl)
			throws DownloadException, ScraperException;

	public abstract int getBrowsePageCount(String page)
			throws DownloadException, ScraperException;

	public abstract int getBrowsePageCount(String page, String redirectUrl)
			throws DownloadException, ScraperException;

	public abstract String extractDetails(String page, String ResourceId)
			throws DownloadException, ScraperException;
	

}